package demo6;

import java.util.Date;

public class Activity {
    private int activityId;
    private String activityContent;
    private String activityName;
    private String activityOrganizer;
    private Date activityPublishDate;

    public int getActivityId() {
        return activityId;
    }
    public Activity(int activityId, String activityContent, String activityName, String activityOrganizer, Date activityPublishDate) {
        this.activityId = activityId;
        this.activityContent = activityContent;
        this.activityName = activityName;
        this.activityOrganizer = activityOrganizer;
        this.activityPublishDate = activityPublishDate;
    }

    // 活动添加
    public static Activity addActivity(int activityId, String activityContent, String activityName, String activityOrganizer, Date activityPublishDate) {
        return new Activity(activityId, activityContent, activityName, activityOrganizer, activityPublishDate);
    }

    // 活动修改
    public void modifyActivity(String activityContent, String activityName, String activityOrganizer, Date activityPublishDate) {
        this.activityContent = activityContent;
        this.activityName = activityName;
        this.activityOrganizer = activityOrganizer;
        this.activityPublishDate = activityPublishDate;
    }

    // 活动查询
    public void queryActivity() {
        System.out.println("活动编号: " + activityId);
        System.out.println("活动内容: " + activityContent);
        System.out.println("活动名称: " + activityName);
        System.out.println("活动组织者: " + activityOrganizer);
        System.out.println("活动发布日期: " + activityPublishDate);
    }

    // 活动结束
    public void endActivity() {
        System.out.println("活动已结束");
    }
}